<script setup>
import {useRoute, onBeforeRouteUpdate} from "vue-router";
import {ref} from "vue";
// import {query} from "express";
// import {defineComponent} from "vue";

// export default defineComponent({
//   methods: {query}
// })

const route = useRoute()
const q = ref(route.query)
const p = ref(route.params)
onBeforeRouteUpdate(
    (to) => {
      q.value = to.query
      p.value = to.params

    }
)
</script>

<template>
  <div>
    <h2>{{ q }}</h2>
    <h3>{{ p }}</h3>
  </div>


</template>

<style scoped>

</style>